<?php
class AppController extends Controller {
    public $components = array('Acl', 'Auth', 'Session');
    public $helpers = array('Html', 'Form', 'Session', 'Js');
    
    public function beforeFilter() {
        //parent::beforeFilter();
         $this->Auth->userScope = array('User.active' => 1);
         
        $this->Auth->authorize = 'actions';
        
        
        $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
        $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');

        
        //$this->Auth->loginRedirect = array('controller' => 'questions', 'action' => 'index');
    }
    
    public function ajaxRequestLayout() {
        $this->layout = 'ajax';
        Configure::write('debug', 0);
    }
}
?>	